package com.heima.wemedia.controller.v1;

import com.heima.common.dtos.ResponseResult;
import com.heima.model.media.dtos.WmUserLoginDto;
import com.heima.model.media.dtos.WmUserTokenDto;
import com.heima.wemedia.service.WmUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class WmUserLoginController {
    @Autowired
    private WmUserService wmUserService;

    @PostMapping("/login/in")
    public ResponseResult login(@Validated @RequestBody WmUserLoginDto dto){
        return wmUserService.login(dto);

    }
}
